import request from '@/utils/request'

// 查询仓库列列表
export function listWarehouseList(query) {
  return request({
    url: '/purchase/warehouseList/list',
    method: 'get',
    params: query
  })
}

// 查询仓库列详细
export function getWarehouseList(id) {
  return request({
    url: '/purchase/warehouseList/' + id,
    method: 'get'
  })
}

// 新增仓库列
export function addWarehouseList(data) {
  return request({
    url: '/purchase/warehouseList',
    method: 'post',
    data: data
  })
}

// 修改仓库列
export function updateWarehouseList(data) {
  return request({
    url: '/purchase/warehouseList',
    method: 'put',
    data: data
  })
}

// 删除仓库列
export function delWarehouseList(id) {
  return request({
    url: '/purchase/warehouseList/' + id,
    method: 'delete'
  })
}

// 启用/不启用仓库按钮
export function enableWarehouse(query) {
  return request({
    url: '/purchase/warehouseList/enableWarehouse',
    method: 'get',
    params: query
  })
}
